/*
 * Copyright (C) 2013 Daniel Wasilew <daniel.wasilew@codeminer.org>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package org.codeminer.parts.library;

/**
 *
 * @author Daniel Wasilew <daniel.wasilew@codeminer.org>
 */
public class Album extends DefaultIdentifiable {

    public static Album byName(String name) {
        return new Album(-1, name, null);
    }

    public static Album byOId(long oid) {
        Album album = new Album(-1, null, null);
        album.setOid(oid);
        return album;
    }

    public static Album byYear(int year) {
        return new Album(year, null, null);
    }

    public static Album byCDDB(String cddb) {
        return new Album(-1, null, cddb);
    }

    private int year;
    private String title;
    private String cddb;

    public Album(int year, String title, String cddb) {
        this.year = year;
        this.title = title;
        this.cddb = cddb;
    }

    public void setCddb(String cddb) {
        this.cddb = cddb;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public void setYear(int year) {
        this.year = year;
    }
    
    public String getTitle() {
        return title;
    }

    public int getYear() {
        return year;
    }

    public String getCddb() {
        return cddb;
    }
}
